Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove duplicate !**/*.mk entry in dependenciesSrc #236683

Merged
merged 3 commits into from
Jan 22, 2025

Conversation

congyuandong
Copy link
Contributor

Fixes: #236682

This pull request addresses the issue of duplicate entries of !**/*.mk in the dependenciesSrc configuration. The redundancy is removed to ensure a clean and efficient configuration

@roblourens roblourens assigned bpasero and unassigned roblourens Dec 22, 2024
@bpasero
Copy link
Member

bpasero commented Jan 11, 2025

What is the exact issue this addresses can you share examples of before/after?

@bpasero bpasero added the info-needed Issue requires more information from poster label Jan 11, 2025
@congyuandong
Copy link
Contributor Author

What is the exact issue this addresses can you share examples of before/after?

This change removes the duplicate values in dependenciesSrc, specifically the '!**/*.mk'.

The getProductionDependencies(root) method returns a list of paths for all production dependencies, excluding test files and all .mk files within those paths. I understand that the dependenciesSrc array only needs one '!**/*.mk', but with the current logic, there would be hundreds of duplicate '!**/*.mk'.

For example:

Assuming productionDependencies is ['dependency1', 'dependency2', 'dependency3']

Before:

dependenciesSrc = [
  'dependency1/**',
  '!dependency1/**/{test,tests}/**',
  '!**/*.mk',
  'dependency2/**',
  '!dependency2/**/{test,tests}/**',
  '!**/*.mk',
  'dependency3/**',
  '!dependency3/**/{test,tests}/**',
  '!**/*.mk',
]

After:

dependenciesSrc = [
  'dependency1/**',
  '!dependency1/**/{test,tests}/**',
  'dependency2/**',
  '!dependency2/**/{test,tests}/**',
  'dependency3/**',
  '!dependency3/**/{test,tests}/**',
  '!**/*.mk',
]

@bpasero bpasero removed the info-needed Issue requires more information from poster label Jan 16, 2025
Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@bpasero bpasero enabled auto-merge (squash) January 22, 2025 19:47
@bpasero bpasero added this to the January 2025 milestone Jan 22, 2025
@bpasero bpasero merged commit 438e5e0 into microsoft:main Jan 22, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate !**/*.mk in dependenciesSrc Configuration
6 participants